package com.example.metadata.service

import com.example.metadata.domain.MetaTable
import com.example.metadata.repository.MetaTableRepository
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

import java.lang
import javax.transaction.Transactional

@Service
class MetaTableService @Autowired()(metaTableRepository: MetaTableRepository) {

  @Transactional
  def save(metaTable:MetaTable): MetaTable = {
    metaTableRepository.save(metaTable)
  }

  def query(): lang.Iterable[MetaTable] = {
    metaTableRepository.findAll()
  }

}
